FROM node:18-alpine as develop-stage
WORKDIR /app
RUN npm i -g @quasar/cli
COPY ./package*.json .
RUN npm install
COPY . .
RUN npm run lint
# CMD ["quasar", "dev"]

# Stage 2: Build
FROM  node:18-alpine AS build-stage
WORKDIR /app
RUN npm i -g @quasar/cli
COPY ./package*.json .
RUN npm install
COPY . .
RUN quasar build

# Stage 3: Production
FROM nginx:1.21.3-alpine AS production-stage
COPY --from=build-stage /app/dist/spa /usr/share/nginx/html
# COPY ./compose/nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]